<template>
    <el-dialog title="实达扫描/人像" :visible.sync="kt600Visible" width="80%" :modal="isShowModal">
        <div>
            
            <div>
                <el-button type="primary" @click="scan" v-show="showScan">证件扫描</el-button>
                <el-button type="primary" @click="photo" v-show="showPhoto">人像采集</el-button>
            </div>
            <div>
                <img :src="kt600PriPhoto" class="kt600Img">
                <img :src="kt600SubPhoto" class="kt600Img">
            </div>
            <el-button type="primary" @click="photoConfirm">确定</el-button>
            <el-button type="primary" @click="photoCancel">取消</el-button>
        </div>
    </el-dialog>
</template>

<script>
    export default {
        name: "shiDaComp",
        data(){
            return {
                kt600Visible:false,
                kt600Dialog:{},
                kt600PriPreviewPhoto:"",
                kt600SubPreviewPhoto:"",
                kt600PriPhoto:"",
                kt600SubPhoto:"",
                ocrResult:"",
                currentPhoto:1,
                showScan:true,
                showPhoto:true,
                isShowModal:true
            }
        },
        methods:{

            scan:function () {
                let param = {"code": "1001"};
                param.currentPhoto = 1;
                this.$emit("shidaHandle", param);
            },
            photo:function () {
                let param = {"code": "1004"};
                param.currentPhoto = 2;
                this.$emit("shidaHandle", param);
            },
            
            photoConfirm:function () {
                this.$parent.edPriPhoto = this.kt600PriPhoto;
                this.$parent.edSubPhoto = this.kt600SubPhoto;
                this.kt600Visible = false;
            },
            photoCancel:function () {
                this.kt600Visible = false;
            },
            
        },
        
    }
</script>

<style scoped>
    .kt600Img{
        width: 49%;
        height: 480px;
        border: black 1px solid;
        margin: 2px 2px 2px 0px;
    }
    .kt600Textarea{
        width: 98.3%;
        height: 117px;
        border: black 1px solid;
        margin: 0px 0px 2px 0px;
    }
    .kt600Button{
        margin: 0px 0px 2px 0px;
    }
</style>